package com.slz3.business.module.goodsManagement.gooTypeLevel1.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.goodsManagement.gooTypeLevel1.domain.GooTypeLevel1;
import com.slz3.business.module.goodsManagement.gooTypeLevel1.domain.GooTypeLevel1Condition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;
@Component
public class GooTypeLevel1ResAtomic {

    public Mono<ServerResponse> add_$GooTypeLevel1UpdateLock(ServerRequest req, GooTypeLevel1 gooTypeLevel1) {
        return GooTypeLevel1ResSafeValid.add(req, gooTypeLevel1) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel1ResExecutor.add(req, gooTypeLevel1);
    }

    public  Mono<ServerResponse> delete_$GooTypeLevel1UpdateLock(ServerRequest req, GooTypeLevel1Condition gooTypeLevel1Condition) {
        return GooTypeLevel1ResSafeValid.delete(req, gooTypeLevel1Condition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel1ResExecutor.delete(req);
    }

    public Mono<ServerResponse> modify_$GooTypeLevel1UpdateLock(ServerRequest req, GooTypeLevel1 gooTypeLevel1) {
        return GooTypeLevel1ResSafeValid.modify(req, gooTypeLevel1) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel1ResExecutor.modify(req, gooTypeLevel1);
    }

    public Mono<ServerResponse> info_$GooTypeLevel1UpdateLock(ServerRequest req) {
        return GooTypeLevel1ResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel1ResExecutor.info(req);
    }

    public  Mono<ServerResponse> auditSubmit_$GooTypeLevel1UpdateLock(ServerRequest req, GooTypeLevel1Condition gooTypeLevel1Condition) {
        return GooTypeLevel1ResSafeValid.auditSubmit(req, gooTypeLevel1Condition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel1ResExecutor.auditSubmit(req);
    }

    public  Mono<ServerResponse> audit_$GooTypeLevel1UpdateLock(ServerRequest req, GooTypeLevel1Condition gooTypeLevel1Condition) {
        return GooTypeLevel1ResSafeValid.audit(req, gooTypeLevel1Condition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel1ResExecutor.audit(req);
    }

    public  Mono<ServerResponse> auditReject_$GooTypeLevel1UpdateLock(ServerRequest req, GooTypeLevel1Condition gooTypeLevel1Condition) {
        return GooTypeLevel1ResSafeValid.auditReject(req, gooTypeLevel1Condition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel1ResExecutor.auditReject(req);
    }


    public  Mono<ServerResponse> usingEnable_$GooTypeLevel1UpdateLock(ServerRequest req, GooTypeLevel1Condition gooTypeLevel1Condition) {
        return GooTypeLevel1ResSafeValid.usingEnable(req, gooTypeLevel1Condition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel1ResExecutor.usingEnable(req);
    }

    public  Mono<ServerResponse> usingDisable_$GooTypeLevel1UpdateLock(ServerRequest req, GooTypeLevel1Condition gooTypeLevel1Condition) {
        return GooTypeLevel1ResSafeValid.usingDisable(req, gooTypeLevel1Condition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooTypeLevel1ResExecutor.usingDisable(req);
    }
}
